//
//  TalkfunCourse.h
//  CloudLive
//
//  Created by 孙兆能 on 16/8/24.
//  Copyright © 2016年 Talkfun. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TalkfunCourseParams.h"
typedef NS_ENUM(NSInteger, TalkfunCourseStatus) {
    
    TalkfunCourseStatusNotInTime = 1,
    TalkfunCourseStatusInTime = 2,
    TalkfunCourseStatusEnd = 3
};

@interface TalkfunCourse : NSObject
/**
 * 旧方法 `addCourse:startTime:endTime:modeType:callback:` 已过期，请使用新的方法 `nowCreateCurriculum:callback:`
 *
 * @param courseName  课程名称
 * @param startTime   课程开始时间
 * @param endTime     课程结束时间
 * @param modeType    课程模式类型
 * @param callback    添加课程的回调，返回结果
 *
 * @deprecated 使用 `nowCreateCurriculum:callback:` 代替
 */
- (void)addCourse:(NSString *)courseName
        startTime:(NSString *)startTime
          endTime:(NSString *)endTime
         modeType:(NSString*)modeType
         callback:(void (^)(id result))callback __attribute__((deprecated("使用 nowCreateCurriculum:callback: 代替")));

/**
 * 启动课程直播
 */
- (void)launch:(NSString *)courseID
      callback:(void (^)(id result))callback;

/**
 * 旧方法 `getCourseList:` 已过期，请使用新的方法 `nowGetCourseList:`
 *
 * @param callback  获取课程列表的回调，返回结果
 *
 * @deprecated 使用 `nowGetCourseList:` 代替
 */
- (void)getCourseList:(void (^)(id result))callback __attribute__((deprecated("使用 nowGetCourseList: 代替")));

/**
 * 旧方法 `createCurriculum:callback:` 已过期，请使用新的方法 `nowCreateCurriculum:callback:`
 *
 * @param params    课程的参数信息
 * @param callback  创建课程的回调，返回状态码、信息和课程结果
 *
 * @deprecated 使用 `nowCreateCurriculum:callback:` 代替
 */
- (void)createCurriculum:(NSDictionary*)params
                callback:(void (^)(id result))callback __attribute__((deprecated("使用 nowCreateCurriculum:callback: 代替")));
/**
 * 旧方法 `verifyLivingOrNot:` 已过期，请使用新的方法 `nowVerifyLivingOrNot:`
 *
 * @param callback  验证账号是否在直播的回调，返回结果
 *
 * @deprecated 使用 `nowVerifyLivingOrNot:` 代替
 */
- (void)verifyLivingOrNot:(void (^)(id result))callback __attribute__((deprecated("使用 nowVerifyLivingOrNot: 代替")));


//TODO: ------------------------------------------------------------------------------

/**创建课程*/
- (void)nowCreateCurriculum:(NSDictionary*)params
                   callback:(void (^)(NSInteger code , NSString *_Nullable msg ,TalkfunCreateCurriculum* result))callback;

/**课程编辑*/
- (void)courseEdit:(NSDictionary*)params
                callback:(void (^)(NSInteger code , NSString *_Nullable msg ,TalkfunCourseEdit* result))callback;
/**开始直播（获取新课程**/
- (void)getNowCourse:(void (^__nullable)(NSInteger code , NSString *_Nullable msg ,TalkfunNowCourse *model))callback;

/**课程信息
 params: {"course_id":"100569"}

 */
- (void)getCourseInfo:(NSDictionary*)params callback:(void (^__nullable)(NSInteger code , NSString *_Nullable msg ,TalkfunCourseInfo *model))callback;

/**直播配置*/
- (void)getLiveConfig:(void (^__nullable)(NSInteger code , NSString *_Nullable  msg ,TalkfunLiveConfig *model))callback;

/**
 * 获取课程列表
 *
 * @param callback  获取课程列表的回调，返回状态码、信息和课程数据列表
 */
- (void)nowGetCourseList:(void (^__nullable)(NSInteger code , NSString *_Nullable msg , NSArray<TalkfunNowCourseData *> *_Nullable list))callback;

/**验证账号是否在直播*/
- (void)nowVerifyLivingOrNot:(void (^__nullable)(NSInteger code , NSString *_Nullable msg , TalkfunverifyLivingOrNot *_Nullable model))callback;

/**获取房间登录信息*/
- (void)roomLoginInfo:(void (^)(NSInteger code , NSString *_Nullable msg ,TalkfunRoomLoginInfo *model))callback;

/**上传课程背景图*/
-(void)thumb:(UIImage *)image
    progress:(nullable void (^)(CGFloat uploadProgress))uploadProgress
    callback:(void (^__nullable)(NSInteger code ,NSString *_Nullable msg , TalkfunThumb *_Nullable model))callback;
@end
